var async = require('async')
var datalist = [{number:10},{number:20},{number:30},{number:40},{number:50}];
	var count = 0;
	var test = function () {
		return count<datalist.length;
	};
	var fn = function(callback){
		console.log(datalist[count].number);
		setTimeout(function () {
			count++;
			callback();
		},1000)
	};
	
	async.whilst(test,fn,function(err){
		if(err){
			console.log(err);
		}
		console.log('whilst结束');
	});
